********************************************************************************
* Leipziger, L, Aarslew, L, & M. Christensen
* Replication Code for "Do Group-Based Inequalities Feel More Unjust?"
* POQ, 2026
* This code: Master code
********************************************************************************
********************************************************************************
		

* This code installs all necessary functions for the empirical analysis. 
* This code combines replication do files

********************************************************************************

clear* 
set more off
frame rename default data
ssc install revrs
set graphic off
**
**
**
** Set working directory: 
global saveloc "insert" //where to place outputs
cd "insert" //Where do find data

**
*	Cleaning data 
do "code/1_cleaning.do"				// cleaning data for US, India, and ZA surveys

**
**
*	Converting clean data to excel files to be used for text analysis
do "code/2_converting.do"				// 
**
**


***Before proceeding to figure 1, you must run the R codes (3_preptext_IN, 4_preptext_ZA, 5_preptext_US)

*	Making figures in manuscript and tables for supplementary  analyses
do "code/6_Figure1.do"				// making Figure 1: Dictionary approch


do "code/7_Figure2.do"				// Figure 2: Distributive fairness

do "code/8_Figure3.do"				// Figure 3: Emotion measures

do "code/9_Figure4.do"				// Figure 4: Fixing ethnicity


**
**
**

*	Supplementary results
do "code/10_supplementary_analyses.do"				// supplementary results 

do "code/11_FigureSM5_TableSM8.do"				// supplementary results 

do "code/12_FigureSM21.do"				// supplementary results 





